<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SC2API: sc2::AbilityData Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="SC2-Logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SC2API
   </div>
   <div id="projectbrief">An API for AI for StarCraft II</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>sc2</b></li><li class="navelem"><a class="el" href="structsc2_1_1_ability_data.html">AbilityData</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structsc2_1_1_ability_data-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">sc2::AbilityData Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Data about an ability.  
 <a href="structsc2_1_1_ability_data.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="sc2__data_8h_source.html">sc2_data.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a15aaa20bd058eeb35728e2eeff6518f6"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a15aaa20bd058eeb35728e2eeff6518f6">Target</a> { <br />
&#160;&#160;<a class="el" href="structsc2_1_1_ability_data.html#a15aaa20bd058eeb35728e2eeff6518f6a6adf97f83acf6453d4a6a4b1070f3754">Target::None</a> = 1, 
<a class="el" href="structsc2_1_1_ability_data.html#a15aaa20bd058eeb35728e2eeff6518f6a2a3cd5946cfd317eb99c3d32e35e2d4c">Target::Point</a> = 2, 
<a class="el" href="structsc2_1_1_ability_data.html#a15aaa20bd058eeb35728e2eeff6518f6a19c562a36aeb455d09534f93b4f5236f">Target::Unit</a> = 3, 
<a class="el" href="structsc2_1_1_ability_data.html#a15aaa20bd058eeb35728e2eeff6518f6a6f98194de114e80cc9a4b2a36f81a073">Target::PointOrUnit</a> = 4, 
<br />
&#160;&#160;<a class="el" href="structsc2_1_1_ability_data.html#a15aaa20bd058eeb35728e2eeff6518f6a40d15a87a5c57aab72d805030ad20ce4">Target::PointOrNone</a> = 5
<br />
 }<tr class="memdesc:a15aaa20bd058eeb35728e2eeff6518f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of target this ability applies to.  <a href="structsc2_1_1_ability_data.html#a15aaa20bd058eeb35728e2eeff6518f6">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a15aaa20bd058eeb35728e2eeff6518f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a77a93314c1b4a6b1cbdc6e1af7dbd2c0"><td class="memItemLeft" align="right" valign="top"><a id="a77a93314c1b4a6b1cbdc6e1af7dbd2c0"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a77a93314c1b4a6b1cbdc6e1af7dbd2c0">AbilityData</a> ()</td></tr>
<tr class="memdesc:a77a93314c1b4a6b1cbdc6e1af7dbd2c0"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structsc2_1_1_ability_data.html" title="Data about an ability. ">AbilityData</a> constructor. <br /></td></tr>
<tr class="separator:a77a93314c1b4a6b1cbdc6e1af7dbd2c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a974e180b290ad684b2806232ccb55b5c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a974e180b290ad684b2806232ccb55b5c">ReadFromProto</a> (const SC2APIProtocol::AbilityData &amp;ability_data)</td></tr>
<tr class="separator:a974e180b290ad684b2806232ccb55b5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a953b2d2ec2cf3aea11a468a433e53660"><td class="memItemLeft" align="right" valign="top"><a id="a953b2d2ec2cf3aea11a468a433e53660"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a953b2d2ec2cf3aea11a468a433e53660">Log</a> () const</td></tr>
<tr class="memdesc:a953b2d2ec2cf3aea11a468a433e53660"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serialize this ability to a string. <br /></td></tr>
<tr class="separator:a953b2d2ec2cf3aea11a468a433e53660"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a1ca4424f072e90cddb81b5fe3b0595f2"><td class="memItemLeft" align="right" valign="top"><a id="a1ca4424f072e90cddb81b5fe3b0595f2"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a1ca4424f072e90cddb81b5fe3b0595f2">available</a></td></tr>
<tr class="memdesc:a1ca4424f072e90cddb81b5fe3b0595f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">If true, the ability is available to the current mods/map. <br /></td></tr>
<tr class="separator:a1ca4424f072e90cddb81b5fe3b0595f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ccb4a8292936f8bc0cda4f1febc3476"><td class="memItemLeft" align="right" valign="top"><a id="a5ccb4a8292936f8bc0cda4f1febc3476"></a>
<a class="el" href="classsc2_1_1_s_c2_type.html">AbilityID</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a5ccb4a8292936f8bc0cda4f1febc3476">ability_id</a></td></tr>
<tr class="memdesc:a5ccb4a8292936f8bc0cda4f1febc3476"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stable ID. For a given ability, this value will be immutable throughout different patches. <br /></td></tr>
<tr class="separator:a5ccb4a8292936f8bc0cda4f1febc3476"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32213c23964c6803cca16bc5055861ff"><td class="memItemLeft" align="right" valign="top"><a id="a32213c23964c6803cca16bc5055861ff"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a32213c23964c6803cca16bc5055861ff">link_name</a></td></tr>
<tr class="memdesc:a32213c23964c6803cca16bc5055861ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Catalog (game data xml) name of the ability. <br /></td></tr>
<tr class="separator:a32213c23964c6803cca16bc5055861ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a915bb3b60f7b3a664c13636292c64aae"><td class="memItemLeft" align="right" valign="top"><a id="a915bb3b60f7b3a664c13636292c64aae"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a915bb3b60f7b3a664c13636292c64aae">link_index</a></td></tr>
<tr class="memdesc:a915bb3b60f7b3a664c13636292c64aae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Catalog (game data xml) index of the ability. <br /></td></tr>
<tr class="separator:a915bb3b60f7b3a664c13636292c64aae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a866b35972f5337e031215963d5fca922"><td class="memItemLeft" align="right" valign="top"><a id="a866b35972f5337e031215963d5fca922"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a866b35972f5337e031215963d5fca922">button_name</a></td></tr>
<tr class="memdesc:a866b35972f5337e031215963d5fca922"><td class="mdescLeft">&#160;</td><td class="mdescRight">Name of the button for the command card. <br /></td></tr>
<tr class="separator:a866b35972f5337e031215963d5fca922"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d7420bdffeed5e35f28abb9d397b0de"><td class="memItemLeft" align="right" valign="top"><a id="a9d7420bdffeed5e35f28abb9d397b0de"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a9d7420bdffeed5e35f28abb9d397b0de">friendly_name</a></td></tr>
<tr class="memdesc:a9d7420bdffeed5e35f28abb9d397b0de"><td class="mdescLeft">&#160;</td><td class="mdescRight">In case the button name is not descriptive. <br /></td></tr>
<tr class="separator:a9d7420bdffeed5e35f28abb9d397b0de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e8389aab78797e9e8f4f88150ba6a76"><td class="memItemLeft" align="right" valign="top"><a id="a5e8389aab78797e9e8f4f88150ba6a76"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a5e8389aab78797e9e8f4f88150ba6a76">hotkey</a></td></tr>
<tr class="memdesc:a5e8389aab78797e9e8f4f88150ba6a76"><td class="mdescLeft">&#160;</td><td class="mdescRight">UI hotkey. <br /></td></tr>
<tr class="separator:a5e8389aab78797e9e8f4f88150ba6a76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26ac48da5fd45e38e541250294438bb4"><td class="memItemLeft" align="right" valign="top"><a id="a26ac48da5fd45e38e541250294438bb4"></a>
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a26ac48da5fd45e38e541250294438bb4">remaps_to_ability_id</a></td></tr>
<tr class="memdesc:a26ac48da5fd45e38e541250294438bb4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This ability id may be represented by the given more generic id. <br /></td></tr>
<tr class="separator:a26ac48da5fd45e38e541250294438bb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94d9523f96fc6497b46fa2d1355e03b5"><td class="memItemLeft" align="right" valign="top"><a id="a94d9523f96fc6497b46fa2d1355e03b5"></a>
std::vector&lt; uint32_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a94d9523f96fc6497b46fa2d1355e03b5">remaps_from_ability_id</a></td></tr>
<tr class="memdesc:a94d9523f96fc6497b46fa2d1355e03b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Other abilities remapped to this generic ability. <br /></td></tr>
<tr class="separator:a94d9523f96fc6497b46fa2d1355e03b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2351270150739e40d945e21fb801bedf"><td class="memItemLeft" align="right" valign="top"><a id="a2351270150739e40d945e21fb801bedf"></a>
<a class="el" href="structsc2_1_1_ability_data.html#a15aaa20bd058eeb35728e2eeff6518f6">Target</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a2351270150739e40d945e21fb801bedf">target</a></td></tr>
<tr class="memdesc:a2351270150739e40d945e21fb801bedf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines if a point, unit, both or none is required as a target. <br /></td></tr>
<tr class="separator:a2351270150739e40d945e21fb801bedf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3cb5f43be280f584aa8246ee15f2f64"><td class="memItemLeft" align="right" valign="top"><a id="aa3cb5f43be280f584aa8246ee15f2f64"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#aa3cb5f43be280f584aa8246ee15f2f64">allow_minimap</a></td></tr>
<tr class="memdesc:aa3cb5f43be280f584aa8246ee15f2f64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Can be cast in the minimap. (Not implemented) <br /></td></tr>
<tr class="separator:aa3cb5f43be280f584aa8246ee15f2f64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af80a0130a5c15ade16adeb9c415b89c0"><td class="memItemLeft" align="right" valign="top"><a id="af80a0130a5c15ade16adeb9c415b89c0"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#af80a0130a5c15ade16adeb9c415b89c0">allow_autocast</a></td></tr>
<tr class="memdesc:af80a0130a5c15ade16adeb9c415b89c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Autocast can be set. <br /></td></tr>
<tr class="separator:af80a0130a5c15ade16adeb9c415b89c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a252839497c027c2278ca126405d53da9"><td class="memItemLeft" align="right" valign="top"><a id="a252839497c027c2278ca126405d53da9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a252839497c027c2278ca126405d53da9">is_building</a></td></tr>
<tr class="memdesc:a252839497c027c2278ca126405d53da9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Requires placement to construct a building. <br /></td></tr>
<tr class="separator:a252839497c027c2278ca126405d53da9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a600be2fc1d258608994d9658f6488c8c"><td class="memItemLeft" align="right" valign="top"><a id="a600be2fc1d258608994d9658f6488c8c"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a600be2fc1d258608994d9658f6488c8c">footprint_radius</a></td></tr>
<tr class="memdesc:a600be2fc1d258608994d9658f6488c8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">If the ability is placing a building, give the radius of the footprint. <br /></td></tr>
<tr class="separator:a600be2fc1d258608994d9658f6488c8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fe8873ca4353862d1e2425526628ec1"><td class="memItemLeft" align="right" valign="top"><a id="a9fe8873ca4353862d1e2425526628ec1"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#a9fe8873ca4353862d1e2425526628ec1">is_instant_placement</a></td></tr>
<tr class="memdesc:a9fe8873ca4353862d1e2425526628ec1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Placement next to an existing structure, e.g., an add-on like a Tech Lab. <br /></td></tr>
<tr class="separator:a9fe8873ca4353862d1e2425526628ec1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac70e65166f5a291b28da3c97c71833b4"><td class="memItemLeft" align="right" valign="top"><a id="ac70e65166f5a291b28da3c97c71833b4"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_ability_data.html#ac70e65166f5a291b28da3c97c71833b4">cast_range</a></td></tr>
<tr class="memdesc:ac70e65166f5a291b28da3c97c71833b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Range unit can cast ability without needing to approach target. <br /></td></tr>
<tr class="separator:ac70e65166f5a291b28da3c97c71833b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Data about an ability. </p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a15aaa20bd058eeb35728e2eeff6518f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a15aaa20bd058eeb35728e2eeff6518f6">&#9670;&nbsp;</a></span>Target</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="structsc2_1_1_ability_data.html#a15aaa20bd058eeb35728e2eeff6518f6">sc2::AbilityData::Target</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Type of target this ability applies to. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a15aaa20bd058eeb35728e2eeff6518f6a6adf97f83acf6453d4a6a4b1070f3754"></a>None&#160;</td><td class="fielddoc"><p>There is no target, applies to self. </p>
</td></tr>
<tr><td class="fieldname"><a id="a15aaa20bd058eeb35728e2eeff6518f6a2a3cd5946cfd317eb99c3d32e35e2d4c"></a>Point&#160;</td><td class="fielddoc"><p>Target is a point. </p>
</td></tr>
<tr><td class="fieldname"><a id="a15aaa20bd058eeb35728e2eeff6518f6a19c562a36aeb455d09534f93b4f5236f"></a>Unit&#160;</td><td class="fielddoc"><p>Target is another unit. </p>
</td></tr>
<tr><td class="fieldname"><a id="a15aaa20bd058eeb35728e2eeff6518f6a6f98194de114e80cc9a4b2a36f81a073"></a>PointOrUnit&#160;</td><td class="fielddoc"><p>Target can be a point or another unit. </p>
</td></tr>
<tr><td class="fieldname"><a id="a15aaa20bd058eeb35728e2eeff6518f6a40d15a87a5c57aab72d805030ad20ce4"></a>PointOrNone&#160;</td><td class="fielddoc"><p>Target can be a point or no target. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a974e180b290ad684b2806232ccb55b5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a974e180b290ad684b2806232ccb55b5c">&#9670;&nbsp;</a></span>ReadFromProto()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sc2::AbilityData::ReadFromProto </td>
          <td>(</td>
          <td class="paramtype">const SC2APIProtocol::AbilityData &amp;&#160;</td>
          <td class="paramname"><em>ability_data</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Serialize this ability entry from the .proto file (used internally). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ability_data</td><td>The proto entry for this ability. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/sc2api/<a class="el" href="sc2__data_8h_source.html">sc2_data.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
